import request from '@/utils/request'

// 查询电厂信息列表
export function listPlant(query) {
  return request({
    url: '/basicInfo/plant/list',
    method: 'get',
    params: query
  })
}

// 查询电厂信息详细
export function getPlant(powerPlantId) {
  return request({
    url: '/basicInfo/plant/' + powerPlantId,
    method: 'get'
  })
}

// 新增电厂信息
export function addPlant(data) {
  return request({
    url: '/basicInfo/plant',
    method: 'post',
    data: data
  })
}

// 修改电厂信息
export function updatePlant(data) {
  return request({
    url: '/basicInfo/plant',
    method: 'put',
    data: data
  })
}

// 删除电厂信息
export function delPlant(powerPlantId) {
  return request({
    url: '/basicInfo/plant/' + powerPlantId,
    method: 'delete'
  })
}
